package com.farmer.service;

import com.farmer.pojo.Admin;
import com.baomidou.mybatisplus.extension.service.IService;
import com.farmer.pojo.UserAllocation;
import com.farmer.utils.Result;
import org.springframework.web.multipart.MultipartFile;


/**
* @author 86183
* @description 针对表【admin(管理员)】的数据库操作Service
* @createDate 2024-04-18 09:30:26
*/

public interface AdminService extends IService<Admin> {
    Result updatePassword(String token, String newPassword);

    Result add(Admin admin);

//    Result delete(Integer id);

    Result deleteAdmin(Integer id);

    Result update(Admin admin);

    Result getById(Integer id);

    Result getAll();

    /*
     * 根据标题模糊查询*/
    Result getByTitleLike(String name);

    Result login(Admin admin);

   Result getAdminInfo(String token);

    Result checkUserName(String username);


    Result register(Admin admin);


    Result deblock(Integer id);

    Result avatarInsert(String token, MultipartFile file);

    Result getAvatar(Integer id);

    /*
    * 分页查询*/
    Result page(Integer pageNum, Integer pageSize);

//    void userAllocation(UserAllocation userAllocation);


    Result userAllocation(UserAllocation userAllocation);
}
